﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CourseUtils;

namespace lab4
{
    class Program
    {
        static void Main(string[] args)
        {
            int min = 1;
            int max = 1;
            int a = IOHelpers.ReadIntFromConsole("Enter number: ", 0, 1000);
            int n = 2;
            while(n<a)
            {
                if (a % n == 0)
                {
                    if (min == 1)
                    {
                        min = n;
                    }
                    max = n;
                }
                 n++;
            }

            Console.WriteLine("{0} {1}", min, max);
            int and =0;

            int num = IOHelpers.ReadIntFromConsole("Enter number: ");
            while(num>0)
            {
               and = num % 10;
               Console.Write(and);

                num = num / 10;
               
            }

            Console.ReadKey();

        }

    }
}
